<template>
  <div>
    <table class="table report-table">
      <colgroup>
        <col width="10%" />
        <col width="30%" />
        <col width="15%" />
        <col width="15%" />
        <col width="15%" />
        <col width="15%" />
      </colgroup>
      <tbody>
        <tr>
          <td colspan="6" style="border: none">
            <h3 class="report-title">贵州省融资担保机构收益情况表（季报）</h3>
          </td>
        </tr>
        <tr rowspan="4">
          <td colspan="6" style="border: none" class="text-left">
            <div>表&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号：DBG03</div>
            <div>制表机关：贵州省人民政府金融工作办公室</div>
            <div class="d-flex justify-content-between">
              <div>填报单位：</div>
              <div>单位：万元</div>
            </div>
          </td>
        </tr>
        <tr>
          <td rowspan="3">序号</td>
          <td rowspan="3">项目</td>
          <td>A</td>
          <td>B</td>
          <td>C</td>
          <td>D</td>
        </tr>
        <tr>
          <td rowspan="2">年初数(万元)</td>
          <td colspan="3">本年度累计数（发生额 万元）</td>
        </tr>
        <tr>
          <td>公司制</td>
          <td>非公司制</td>
          <td>合计</td>
        </tr>
        <tr v-for="(p, index) of reportDetail" :key="index">
          <td>{{ p.order_num }}</td>
          <td
            class="text-left"
            v-if="[2, 4, 5, 6].includes(+p.order_num)"
            :class="[2, 4].includes(+p.order_num) ? 'text-indent' : 'item-list'"
          >
            {{ tableColumn[p.order_num] }}
          </td>
          <td class="text-left" v-else>{{ tableColumn[p.order_num] }}</td>
          <td>{{ p.year_begin_funds }}</td>
          <td>{{ p.com_funds }}</td>
          <td>{{ p.un_com_funds }}</td>
          <td>{{ add(p.com_funds, p.un_com_funds) || '0.00' }}</td>
        </tr>

        <tr rowspan="4">
          <td colspan="6" style="border: none">
            <div class="d-flex justify-content-between">
              <div>单位负责人：</div>
              <div>统计负责人：</div>
              <div>填表人：</div>
              <div>
                填报日期：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              </div>
            </div>
            <div class="d-flex">
              <div>填报说明：</div>
              <div class="flex-1 text-left">
                <div>1．本表由融资性担保机构填报(年检不合格的辖内融资担保机构不参加数据报送)。</div>
                <div>
                  2．本表统计范围:本省（区、市）登记注册的融资担保法人机构及合伙制企业为统计对象全部汇总填报（本省（区、市）融资担保法人机构在省（区、市）外设立的分支机构的有关情况需汇总至法人机构统一填报。
                </div>
                <div>3．本报表为季报，报送时间为季后15日前。</div>
                <div>4.填列的金额保留两位小数。</div>
              </div>
            </div>
            <div></div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
import { add } from '@vimi/utils-tool'
const tableColumn = {
  1: '1.担保业务收入',
  2: '其中：1.1融资性担保费收入',
  3: '2.担保业务成本',
  4: '其中：2.1融资性担保赔偿支出 ',
  5: '2.2融资性分担保费支出',
  6: '2.3营业税金及附加',
  7: '3.担保业务利润',
  8: '4.利息净收入（净支出则前加“－”号填列）',
  9: '5.其他业务利润',
  10: '6.业务及管理费',
  11: '7.投资收益（投资损失则前加“－”号填列）',
  12: '8.营业利润',
  13: '9.营业外净收入（净亏损则前加“－”号填列）',
  14: '10.资产减值损失（转回的金额则前加“－”号填列）',
  15: '11.所得税',
  16: '12.净利润（净亏损则前加“－”号填列）',
}
export default {
  components: {},
  props: {},
  data() {
    return {
      tableColumn,
      tableName: '',
      order: {
        create_time: 'desc',
      },
      loading: false,
      reportMonth: {},
      reportDetail: [],
    }
  },
  computed: {},
  watch: {},
  created() {
    this.getData()
  },
  mounted() {},
  methods: {
    add,
    initData() {
      this.reportDetail = []
      Object.keys(this.tableColumn).forEach(key => {
        this.reportDetail.push({
          order_num: key,
        })
      })
    },
    getData() {
      this.initData()
      this.loading = true

      this.loading = false
    },
  },
}
</script>

<style lang="scss" scoped>
.input-td {
  background: #ffffee;
}
$report-td-border-color: #000;
.report-table {
  position: relative;
  tbody td {
    border: 1px solid $report-td-border-color;
    vertical-align: middle;
    text-align: center;
  }
}
.report-title {
  font-size: 1.5rem;
  font-family: '方正小标宋简体', 'SimSun', cursive;
  margin: 0;
  text-align: center;
}
.text-indent {
  text-indent: 2rem;
}
.item-list {
  padding-left: 5.7rem;
}
</style>
